//
// CFontGenerator.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

public class CFontGenerator {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CFontGenerator(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CFontGenerator obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CFontGenerator(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CFontGenerator(String fontFileName, String fontExFileName) {
    this(nel3dJNI.new_CFontGenerator__SWIG_0(fontFileName, fontExFileName), true);
  }

  public CFontGenerator(String fontFileName) {
    this(nel3dJNI.new_CFontGenerator__SWIG_1(fontFileName), true);
  }

  public SWIGTYPE_p_unsigned_char getBitmap(SWIGTYPE_p_ucchar c, long size, SWIGTYPE_p_unsigned_int width, SWIGTYPE_p_unsigned_int height, SWIGTYPE_p_unsigned_int pitch, SWIGTYPE_p_int left, SWIGTYPE_p_int top, SWIGTYPE_p_int advx, SWIGTYPE_p_unsigned_int glyphIndex) {
    long cPtr = nel3dJNI.CFontGenerator_getBitmap(swigCPtr, this, SWIGTYPE_p_ucchar.getCPtr(c), size, SWIGTYPE_p_unsigned_int.getCPtr(width), SWIGTYPE_p_unsigned_int.getCPtr(height), SWIGTYPE_p_unsigned_int.getCPtr(pitch), SWIGTYPE_p_int.getCPtr(left), SWIGTYPE_p_int.getCPtr(top), SWIGTYPE_p_int.getCPtr(advx), SWIGTYPE_p_unsigned_int.getCPtr(glyphIndex));
    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
  }

  public void getSizes(SWIGTYPE_p_ucchar c, long size, SWIGTYPE_p_unsigned_int width, SWIGTYPE_p_unsigned_int height) {
    nel3dJNI.CFontGenerator_getSizes(swigCPtr, this, SWIGTYPE_p_ucchar.getCPtr(c), size, SWIGTYPE_p_unsigned_int.getCPtr(width), SWIGTYPE_p_unsigned_int.getCPtr(height));
  }

  public void getKerning(SWIGTYPE_p_ucchar left, SWIGTYPE_p_ucchar right, SWIGTYPE_p_int kernx) {
    nel3dJNI.CFontGenerator_getKerning(swigCPtr, this, SWIGTYPE_p_ucchar.getCPtr(left), SWIGTYPE_p_ucchar.getCPtr(right), SWIGTYPE_p_int.getCPtr(kernx));
  }

  public long getCharIndex(SWIGTYPE_p_ucchar c) {
    return nel3dJNI.CFontGenerator_getCharIndex(swigCPtr, this, SWIGTYPE_p_ucchar.getCPtr(c));
  }

  public long getUID() {
    return nel3dJNI.CFontGenerator_getUID(swigCPtr, this);
  }

}
